ALMaSS  1.0
The Animal, Landscape and Man Simulation System
Partridge_Chick Class Reference

Partridge chick class. More...

#include <Partridge_All.h>

Inheritance diagram for Partridge_Chick:
Partridge_Base TAnimal TALMaSSObject Partridge_Chick2

Public Member Functions

virtual void BeginStep (void)
 Chick BeginStep. More...
 
virtual void Step (void)
 Chick Step. More...
 
virtual void EndStep (void)
 Chick EndStep. More...
 
virtual bool DailyMortality ()
 Background mortality test. More...
 
virtual bool OnFarmEvent (FarmToDo event)
 Farm event handler. More...
 
virtual void Dying ()
 Generic dying handler. More...
 
void OnYouAreDead ()
 Message handler. More...
 
 Partridge_Chick (int a_x, int a_y, Partridge_Female *a_mother, Partridge_Covey *a_flock, Landscape *a_map, bool a_sex, int a_family_counter, Partridge_Population_Manager *a_manager)
 Constructor. More...
 
virtual ~Partridge_Chick (void)
 Destructor. More...
 
- Public Member Functions inherited from Partridge_Base
Partridge_Object GetObjectType ()
 Supply object type. More...
 
bool GetUncleStatus ()
 Supply uncle status. More...
 
void SetUncleStatus (bool a_Status)
 Set uncle status. More...
 
bool PossibleMate (Partridge_Base *a_partridge)
 Can we mate? More...
 
virtual bool ArePaired ()
 Overridden base function. More...
 
Partridge_CoveyGetCovey (void)
 Supply covey pointer. More...
 
Partridge_State GetState (void)
 Supply state. More...
 
void SetState (Partridge_State a_pars)
 Set state. More...
 
int GetFamily (void)
 Supply family ID. More...
 
int GetAge (void)
 Supply age. More...
 
void SetAge (int a_age)
 Set age. More...
 
long GetID (void)
 Supply ID. More...
 
void SetFamily (unsigned int family)
 Set family ID. More...
 
void SetCovey (Partridge_Covey *a_covey)
 Set covey pointer. More...
 
void MakeCovey ()
 Create our own covey. More...
 
void SwitchCovey (Partridge_Covey *a_covey)
 Swap coveys. More...
 
 Partridge_Base (int a_born_x, int a_born_y, int a_x, int a_y, int a_family_counter, Partridge_Covey *a_covey, Landscape *a_map, Partridge_Population_Manager *a_manager)
 Constructor for Partridge_Base. More...
 
virtual ~Partridge_Base (void)
 Destructor. More...
 
virtual void CopyMyself (int a_Ptype)
 Duplicate this object. More...
 
- Public Member Functions inherited from TAnimal
unsigned SupplyFarmOwnerRef ()
 
AnimalPosition SupplyPosition ()
 
APoint SupplyPoint ()
 
int SupplyPolygonRef ()
 
int Supply_m_Location_x ()
 
int Supply_m_Location_y ()
 
virtual void KillThis ()
 
virtual void CopyMyself ()
 
void SetX (int a_x)
 
void SetY (int a_y)
 
 TAnimal (int x, int y, Landscape *L)
 
virtual void ReinitialiseObject (int x, int y, Landscape *L)
 Used to re-use an object - must be implemented in descendent classes. More...
 
virtual int WhatState ()
 
void CheckManagement (void)
 
void CheckManagementXY (int x, int y)
 
- Public Member Functions inherited from TALMaSSObject
int GetCurrentStateNo ()
 Returns the current state number. More...
 
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
 
bool GetStepDone ()
 Returns the step done indicator flag. More...
 
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
 
virtual void ReinitialiseObject ()
 Used to re-use an object - must be implemented in descendent classes. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()
 The destructor for TALMaSSObject. More...
 
void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 

Protected Member Functions

virtual Partridge_State ChDeveloping (void)
 Development. More...
 
virtual Partridge_State ChMaturing (void)
 Maturation. More...
 
void ChDying (void)
 Chick Dying. More...
 
- Protected Member Functions inherited from Partridge_Base
virtual void CheckMatePointers ()
 Debug. More...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Protected Attributes

bool m_sex
 Sex. More...
 
int m_starve
 Days spent starving. More...
 
- Protected Attributes inherited from Partridge_Base
int m_signal
 Used to pass information to outputs. More...
 
long m_id
 Individual bird ID. More...
 
int m_family_counter
 Family ID. More...
 
int m_age
 Age in days. More...
 
int m_born_x
 x-coord of birth More...
 
int m_born_y
 y-coord of birth More...
 
bool m_UncleStatus
 If has uncle status in the covey. More...
 
Partridge_Object m_object_type
 Type of pob object this is. More...
 
Partridge_Coveym_covey
 Pointer to the covey. More...
 
Partridge_State m_state
 Current behavioural state. More...
 
- Protected Attributes inherited from TAnimal
int m_Location_x
 
int m_Location_y
 
Landscapem_OurLandscape
 
- Protected Attributes inherited from TALMaSSObject
int m_CurrentStateNo
 The basic state number for all objects - '-1' indicates death. More...
 
bool m_StepDone
 Indicates whether the iterative step code is done for this timestep. More...
 

Additional Inherited Members

- Public Attributes inherited from Partridge_Base
Partridge_Population_Managerm_OurPopulationManager
 Pointer to the population manager. More...
 

Detailed Description

Partridge chick class.

Constructor & Destructor Documentation

◆ Partridge_Chick()

Partridge_Chick::Partridge_Chick ( int  a_born_x,
int  a_born_y,
Partridge_Female a_mother,
Partridge_Covey a_covey,
Landscape a_map,
bool  a_sex,
int  a_family_counter,
Partridge_Population_Manager a_manager 
)

Constructor.

The constructor. Ensures sensible values for attributes not set by the base constructor.

664  :
665  Partridge_Base( a_born_x, a_born_y, a_born_x, a_born_y, a_family_counter, a_covey, a_map, a_manager )
666  {
667  m_age = 0;
668  m_starve = 0;
669  m_sex = a_sex;
671  m_covey->OnAddChick( a_mother );
672 
673 }
@ pob_Chick
Definition: Partridge_All.h:297
int m_age
Age in days.
Definition: Partridge_All.h:410
Partridge_Object m_object_type
Type of pob object this is.
Definition: Partridge_All.h:418
Partridge_Covey * m_covey
Pointer to the covey.
Definition: Partridge_All.h:420
Partridge_Base(int a_born_x, int a_born_y, int a_x, int a_y, int a_family_counter, Partridge_Covey *a_covey, Landscape *a_map, Partridge_Population_Manager *a_manager)
Constructor for Partridge_Base.
Definition: Partridge_All.cpp:156
int m_starve
Days spent starving.
Definition: Partridge_All.h:592
bool m_sex
Sex.
Definition: Partridge_All.h:590
void OnAddChick(Partridge_Female *a_pf)
Add a chick.
Definition: Partridge_Covey.cpp:2451

References Partridge_Base::m_age, Partridge_Base::m_covey, Partridge_Base::m_object_type, m_sex, m_starve, Partridge_Covey::OnAddChick(), and pob_Chick.

◆ ~Partridge_Chick()

virtual Partridge_Chick::~Partridge_Chick ( void  )
inlinevirtual

Destructor.

619  {;
620  }

Member Function Documentation

◆ BeginStep()

void Partridge_Chick::BeginStep ( void  )
virtual

Chick BeginStep.

BeginStep checks for daily mortality and management events, also deals with knock-on deaths for other chicks in the covey.

Reimplemented from TAnimal.

Reimplemented in Partridge_Chick2.

681 {
682  if ( m_CurrentStateNo == -1 )
683  {
684  return;
685  }
686  if ( !DailyMortality() )
687  {
688  CheckManagement();
689  //m_covey->SanityCheck2(m_covey->GetOurChicks() );
691  // This call is because it is OK to get multiple calls to this function
692  // but it is not OK if no-one calls it!
693  m_covey->MoveDistance( g_MaxWalk[m_age], 10, 10000 );
694  }
695  else
696  {
697  m_signal = 1;
698  ChDying();
699  // The death of this chick will impact on the others, so that their deaths are more likely
701  }
702 }
int g_MaxWalk[200]
Definition: Partridge_Population_Manager.cpp:66
int m_signal
Used to pass information to outputs.
Definition: Partridge_All.h:404
void ChDying(void)
Chick Dying.
Definition: Partridge_All.cpp:989
virtual bool DailyMortality()
Background mortality test.
Definition: Partridge_All.cpp:905
void MoveDistance(int a_max_distance, int a_step_size, double a_food_density_needed)
Entry point for movement.
Definition: Partridge_Covey.cpp:652
void SetChickAge(int age)
Set chick age.
Definition: Partridge_Covey.h:481
void ChickExtraMortality()
Apply extra chick mortality.
Definition: Partridge_Covey.cpp:2671
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:116
void CheckManagement(void)
Definition: PopulationManager.cpp:1404

References ChDying(), TAnimal::CheckManagement(), Partridge_Covey::ChickExtraMortality(), DailyMortality(), g_MaxWalk, Partridge_Base::m_age, Partridge_Base::m_covey, TALMaSSObject::m_CurrentStateNo, Partridge_Base::m_signal, Partridge_Covey::MoveDistance(), and Partridge_Covey::SetChickAge().

◆ ChDeveloping()

Partridge_State Partridge_Chick::ChDeveloping ( void  )
protectedvirtual

Development.

Chick development is simplified to developing as long as the chick is not starving for too long. This is determined by the age dependent energy needs and rainfall. This could also be augmented to cinclude temperature at a later stage.
At 42 days old the Chick becomes a Partridge_Chick2.

Reimplemented in Partridge_Chick2.

923 {
924  m_age++;
925  // have we eaten enough to survive?
926  double food = m_covey->SupplyFoodToday();
927  double ex = cfg_par_extraction_rate.value();
928  food *= ex;
929 #ifdef __RAIN_HURTS
930  if ( food > ( g_FoodNeed[m_age] * (1+( g_par_rainfactor * m_OurLandscape->SupplyRain()) ) ))
931  {
932  m_starve = 0;
933  }
934 #else
935  if ( food > g_FoodNeed[m_age] )
936  {
937  m_starve = 0;
938  }
939 #endif
940  else if ( ++m_starve > cfg_par_starve_threshold.value() )
941  {
942  m_signal = 4;
943  ChDying(); // Kill it now
944  //m_OurPopulationManager->WriteParJuvMort(m_OurLandscape->SupplyYearNumber(),m_OurLandscape->SupplyDayInYear(),m_age,m_signal);
946  return pars_ChDying;
947  }
948  if ( m_age < 42 )
949  {
950  return pars_ChDeveloping;
951  }
952  else
953  return pars_ChMaturing;
954 }
double g_FoodNeed[200]
Definition: Partridge_Population_Manager.cpp:65
static CfgInt cfg_par_starve_threshold("PAR_STARVE_THRESHOLD", CFG_CUSTOM, 4)
Chick - no. days or negative energy before death.
double g_par_rainfactor
Definition: Partridge_Population_Manager.cpp:63
static CfgFloat cfg_par_extraction_rate("PAR_EXTRACTION_RATE", CFG_CUSTOM, 0.0085)
Food extraction rate.
@ pars_ChDeveloping
Definition: Partridge_All.h:276
@ pars_ChMaturing
Definition: Partridge_All.h:276
@ pars_ChDying
Definition: Partridge_All.h:276
double value(void)
Definition: configurator.h:118
int value(void)
Definition: configurator.h:98
double SupplyRain(void)
Definition: landscape.h:1365
Partridge_Population_Manager * m_OurPopulationManager
Pointer to the population manager.
Definition: Partridge_All.h:430
double SupplyFoodToday(void)
Return the food obtained today.
Definition: Partridge_Covey.cpp:905
k_factors * m_Ourkfactors
Pointer to kfactors object.
Definition: Partridge_Population_Manager.h:169
Landscape * m_OurLandscape
Definition: PopulationManager.h:229
population_attributes * m_ThisYear
Definition: Partridge_All.h:251
void incNoStarvedChicks()
Definition: Partridge_All.h:188

References cfg_par_extraction_rate, cfg_par_starve_threshold, ChDying(), g_FoodNeed, g_par_rainfactor, population_attributes::incNoStarvedChicks(), Partridge_Base::m_age, Partridge_Base::m_covey, Partridge_Population_Manager::m_Ourkfactors, TAnimal::m_OurLandscape, Partridge_Base::m_OurPopulationManager, Partridge_Base::m_signal, m_starve, k_factors::m_ThisYear, pars_ChDeveloping, pars_ChDying, pars_ChMaturing, Partridge_Covey::SupplyFoodToday(), Landscape::SupplyRain(), CfgInt::value(), and CfgFloat::value().

Referenced by EndStep().

◆ ChDying()

void Partridge_Chick::ChDying ( void  )
protected

Chick Dying.

All the housekeeping necessary to die.

990 {
993  m_covey->RemoveMember( this );
995  m_CurrentStateNo = -1;
996  m_StepDone = true;
997  // Keep the k_factor analysis happy and uptodate
998  if ( m_age > 42 )
999  {
1000  if ( m_sex == false )
1001  {
1003  }
1004  else
1006  }
1008 
1009 }
@ pars_Destroy
Definition: Partridge_All.h:287
Partridge_State m_state
Current behavioural state.
Definition: Partridge_All.h:422
void OnChickDeath()
Remove a dead chick.
Definition: Partridge_Covey.cpp:2477
int RemoveMember(Partridge_Base *a_former_member)
Remove a member from the covey.
Definition: Partridge_Covey.cpp:1664
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:118
void incNoDeadChicks()
Definition: Partridge_All.h:168
void incNoDeadFemales()
Definition: Partridge_All.h:172
void incNoDeadMales()
Definition: Partridge_All.h:176

References population_attributes::incNoDeadChicks(), population_attributes::incNoDeadFemales(), population_attributes::incNoDeadMales(), Partridge_Base::m_age, Partridge_Base::m_covey, TALMaSSObject::m_CurrentStateNo, Partridge_Population_Manager::m_Ourkfactors, Partridge_Base::m_OurPopulationManager, m_sex, Partridge_Base::m_state, TALMaSSObject::m_StepDone, k_factors::m_ThisYear, Partridge_Covey::OnChickDeath(), pars_Destroy, and Partridge_Covey::RemoveMember().

Referenced by BeginStep(), Partridge_Chick2::BeginStep(), ChDeveloping(), Dying(), EndStep(), Partridge_Chick2::EndStep(), OnFarmEvent(), and OnYouAreDead().

◆ ChMaturing()

Partridge_State Partridge_Chick::ChMaturing ( void  )
protectedvirtual

Maturation.

Matures the Chick object into a Partridge_Chick2 object, passing all the necessary informatin using a Chick_struct.

Reimplemented in Partridge_Chick2.

962 {
963  //m_covey->SanityCheck2(m_covey->GetOurChicks() );
964  Chick_struct * Ch;
965  Ch = new Chick_struct;
966  Ch->x = m_Location_x;
967  Ch->y = m_Location_y;
968  Ch->bx = m_Location_x;
969  Ch->by = m_Location_y;
970  Ch->Mum = NULL;
971  Ch->m_covey = m_covey;
972  Ch->sex = m_sex;
974  // Create objects will result in the object being added to the covey
976  // object will be destroyed by death state
977  // but must let Dad know anyway
978  delete Ch;
979  // Set up the flags to destroy this object
980  m_CurrentStateNo = -1;
981  m_StepDone = true;
982  m_covey->RemoveMember( this );
983  //m_covey->SanityCheck2(m_covey->GetOurChicks() );
984  return pars_Destroy;
985 }
@ pob_Chick2
Definition: Partridge_All.h:297
Struct to pass chick information.
Definition: Partridge_All.h:374
bool sex
Definition: Partridge_All.h:377
Partridge_Female * Mum
Definition: Partridge_All.h:376
int m_family_counter
Family ID.
Definition: Partridge_All.h:408
void CreateObjects(int ob_type, Partridge_struct *data, int number)
Definition: Partridge_Population_Manager.cpp:368
int by
Definition: Partridge_All.h:347
Partridge_Covey * m_covey
Definition: Partridge_All.h:349
int x
Definition: Partridge_All.h:344
int bx
Definition: Partridge_All.h:346
int y
Definition: Partridge_All.h:345
int family_counter
Definition: Partridge_All.h:350
int m_Location_y
Definition: PopulationManager.h:228
int m_Location_x
Definition: PopulationManager.h:225

References Partridge_struct::bx, Partridge_struct::by, Partridge_Population_Manager::CreateObjects(), Partridge_struct::family_counter, Partridge_struct::m_covey, Partridge_Base::m_covey, TALMaSSObject::m_CurrentStateNo, Partridge_Base::m_family_counter, TAnimal::m_Location_x, TAnimal::m_Location_y, Partridge_Base::m_OurPopulationManager, m_sex, TALMaSSObject::m_StepDone, Chick_struct::Mum, pars_Destroy, pob_Chick2, Partridge_Covey::RemoveMember(), Chick_struct::sex, Partridge_struct::x, and Partridge_struct::y.

Referenced by Step().

◆ DailyMortality()

bool Partridge_Chick::DailyMortality ( void  )
virtual

Background mortality test.

Does the simple probability test against chance of daily mortality for non-specifically modelled mortalities.

Reimplemented from Partridge_Base.

Reimplemented in Partridge_Chick2.

906 {
908  {
909  // Optional output
910  // m_OurPopulationManager->AddEaten();
911  return true;
912  }
913  return false;
914 }
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
static CfgFloat cfg_par_chick_mortality("PAR_CHICK_MORTALITY", CFG_CUSTOM, 0.02043)
Chick - daily probability of non-explicitly modelled mortality.

References cfg_par_chick_mortality, g_rand_uni, and CfgFloat::value().

Referenced by BeginStep().

◆ Dying()

virtual void Partridge_Chick::Dying ( )
inlinevirtual

Generic dying handler.

Reimplemented from TAnimal.

607  {
608  ChDying();
609  }

References ChDying().

Referenced by Partridge_Chick2::OnFarmEvent().

◆ EndStep()

void Partridge_Chick::EndStep ( void  )
virtual

Chick EndStep.

EndStep does the developing for the Chick. This ensures that someone (adult) has called the methods necessary to collect food for developing that day during Step.

Reimplemented from TAnimal.

Reimplemented in Partridge_Chick2.

739 {
740  if ( m_CurrentStateNo == -1 )
741  return;
742 
743  switch ( m_state )
744  {
745  case pars_Initiation:
746  case pars_ChMaturing:
747  break;
748  case pars_ChDying:
749  ChDying();
750  break;
751  case pars_ChDeveloping:
752  m_state = ChDeveloping();
753  break;
754  default:
755  m_OurLandscape->Warn( "Partridge_Chick::EndStep - unknown pars type", NULL );
756  exit( 1 );
757  }
758 }
@ pars_Initiation
Definition: Partridge_All.h:267
void Warn(std::string a_msg1, std::string a_msg2)
Definition: landscape.h:1579
virtual Partridge_State ChDeveloping(void)
Development.
Definition: Partridge_All.cpp:922

References ChDeveloping(), ChDying(), TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, Partridge_Base::m_state, pars_ChDeveloping, pars_ChDying, pars_ChMaturing, pars_Initiation, and Landscape::Warn().

◆ OnFarmEvent()

bool Partridge_Chick::OnFarmEvent ( FarmToDo  event)
virtual

Farm event handler.

Check and respond to farm events either using config variables for cutting or direct inline values.

Reimplemented from TAnimal.

Reimplemented in Partridge_Chick2.

766 {
767  switch ( event )
768  {
769  case sleep_all_day:
770  break;
771  case autumn_plough:
772  break;
773  case autumn_harrow:
774  break;
775  case autumn_roll:
776  break;
777  case autumn_sow:
778  break;
779  case winter_plough:
780  break;
781  case deep_ploughing:
782  break;
783  case spring_plough:
784  break;
785  case spring_harrow:
786  break;
787  case spring_roll:
788  break;
789  case spring_sow:
790  break;
791  case fp_npks:
792  break;
793  case fp_npk:
794  break;
795  case fp_pk:
796  break;
797  case fp_liquidNH3:
798  break;
799  case fp_slurry:
800  if ( g_rand_uni() < 0.01 ) ChDying();
801  break;
802 
803 
805  break;
806  case fp_manure:
807  break;
808  case fp_greenmanure:
809  break;
810  case fp_sludge:
811  break;
812  case fa_npk:
813  break;
814  case fa_pk:
815  break;
816  case fa_slurry:
817  if ( g_rand_uni() < 0.01 ) ChDying();
818  break;
819  case fa_ammoniumsulphate:
820  break;
821  case fa_manure:
822  break;
823  case fa_greenmanure:
824  break;
825  case fa_sludge:
826  break;
827  case herbicide_treat:
828  case glyphosate:
829  break;
830  case growth_regulator:
831  break;
832  case fungicide_treat:
833  break;
835  case insecticide_treat:
836  case product_treat:
837  break;
838  case molluscicide:
839  break;
840  case row_cultivation:
841  break;
842  case strigling:
843  if ( g_rand_uni() < 0.10 ) ChDying();
844  break;
845  case hilling_up:
846  break;
847  case water:
848  if ( g_rand_uni() < 0.01 ) ChDying();
849  break;
850  case swathing:
851  break;
852  case harvest:
853  if ( g_rand_uni() < cfg_par_ch_cut.value() ) ChDying();
854  break;
855  case cattle_out:
856  break;
857  case cattle_out_low:
858  break;
859  case cut_to_hay:
860  if ( g_rand_uni() < cfg_par_ch_cut.value() ) ChDying();
861  break;
862  case cut_to_silage:
863  if ( g_rand_uni() < cfg_par_ch_cut.value() ) ChDying();
864  break;
865  case straw_chopping:
866  break;
867  case hay_turning:
868  break;
869  case hay_bailing:
870  if ( g_rand_uni() < cfg_par_ch_cut.value() ) ChDying();
871  break;
872  case stubble_harrowing:
873  break;
875  break;
876  case burn_straw_stubble:
877  break;
878  case mow:
879  if ( g_rand_uni() < cfg_par_ch_cut.value() ) ChDying();
880  break;
881  case cut_weeds:
882  if ( g_rand_uni() < cfg_par_ch_cut.value() ) ChDying();
883  break;
884  case pigs_out:
885  break;
886  case strigling_sow:
887  if ( g_rand_uni() < 10 ) ChDying();
888  break;
889  default:
890  m_OurLandscape->Warn( "Skylark_Clutch::OnFarmEvent(): Unknown event type:", m_OurLandscape->EventtypeToString( event ) );
891  exit( 1 );
892  }
893  // Must incorporate a test here in case the animal is dead - killing it twice
894  // can be a bad idea
895  if ( m_state == pars_Destroy ) return true;
896  else
897  return false;
898 }
static CfgFloat cfg_par_ch_cut("PAR_CH_CUT_MORT", CFG_CUSTOM, 0.05)
Chick % mortality on cutting.
std::string EventtypeToString(int a_event)
Definition: Landscape.cpp:3918
@ burn_straw_stubble
Definition: treatment.h:92
@ autumn_harrow
Definition: treatment.h:37
@ swathing
Definition: treatment.h:81
@ fa_pk
Definition: treatment.h:62
@ winter_plough
Definition: treatment.h:42
@ strigling
Definition: treatment.h:77
@ fp_npks
Definition: treatment.h:48
@ glyphosate
Definition: treatment.h:102
@ fa_sludge
Definition: treatment.h:68
@ fp_liquidNH3
Definition: treatment.h:51
@ spring_roll
Definition: treatment.h:46
@ fa_greenmanure
Definition: treatment.h:67
@ spring_plough
Definition: treatment.h:44
@ molluscicide
Definition: treatment.h:75
@ syninsecticide_treat
Definition: treatment.h:99
@ hay_turning
Definition: treatment.h:88
@ autumn_roll
Definition: treatment.h:38
@ fp_manure
Definition: treatment.h:55
@ deep_ploughing
Definition: treatment.h:43
@ pigs_out
Definition: treatment.h:84
@ fa_npk
Definition: treatment.h:61
@ herbicide_treat
Definition: treatment.h:71
@ row_cultivation
Definition: treatment.h:76
@ spring_sow
Definition: treatment.h:47
@ fungicide_treat
Definition: treatment.h:73
@ fp_manganesesulphate
Definition: treatment.h:53
@ harvest
Definition: treatment.h:82
@ cut_to_silage
Definition: treatment.h:86
@ sleep_all_day
Definition: treatment.h:33
@ mow
Definition: treatment.h:93
@ fa_ammoniumsulphate
Definition: treatment.h:65
@ autumn_plough
Definition: treatment.h:34
@ straw_chopping
Definition: treatment.h:87
@ fa_manure
Definition: treatment.h:66
@ fp_greenmanure
Definition: treatment.h:56
@ fa_slurry
Definition: treatment.h:63
@ product_treat
Definition: treatment.h:101
@ stubble_harrowing
Definition: treatment.h:90
@ hilling_up
Definition: treatment.h:79
@ growth_regulator
Definition: treatment.h:72
@ insecticide_treat
Definition: treatment.h:74
@ cattle_out_low
Definition: treatment.h:100
@ cut_to_hay
Definition: treatment.h:85
@ cut_weeds
Definition: treatment.h:94
@ fp_sludge
Definition: treatment.h:57
@ autumn_sow
Definition: treatment.h:41
@ fp_npk
Definition: treatment.h:49
@ fp_pk
Definition: treatment.h:50
@ hay_bailing
Definition: treatment.h:89
@ spring_harrow
Definition: treatment.h:45
@ strigling_sow
Definition: treatment.h:95
@ cattle_out
Definition: treatment.h:83
@ fp_slurry
Definition: treatment.h:52
@ water
Definition: treatment.h:80
@ autumn_or_spring_plough
Definition: treatment.h:91

References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, burn_straw_stubble, cattle_out, cattle_out_low, cfg_par_ch_cut, ChDying(), cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_greenmanure, fa_manure, fa_npk, fa_pk, fa_sludge, fa_slurry, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_sludge, fp_slurry, fungicide_treat, g_rand_uni, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, herbicide_treat, hilling_up, insecticide_treat, TAnimal::m_OurLandscape, Partridge_Base::m_state, molluscicide, mow, pars_Destroy, pigs_out, product_treat, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, straw_chopping, strigling, strigling_sow, stubble_harrowing, swathing, syninsecticide_treat, CfgFloat::value(), Landscape::Warn(), water, and winter_plough.

◆ OnYouAreDead()

void Partridge_Chick::OnYouAreDead ( )

Message handler.

Called by any method that directly kills a chick. Will cause housekeeping to be done by informing those objects that need to know.

1017 {
1018  ChDying();
1019 }

References ChDying().

Referenced by Partridge_Covey::KillExcessChicks(), and Partridge_Communication::PassMessage().

◆ Step()

void Partridge_Chick::Step ( void  )
virtual

Chick Step.

Step only takes care of maturing for this class.

Reimplemented from TAnimal.

Reimplemented in Partridge_Chick2.

710 {
711  if ( m_CurrentStateNo == -1 || m_StepDone )
712  return;
713 
714  switch ( m_state )
715  {
716  case pars_Initiation:
718  case pars_ChDeveloping:
719  case pars_ChDying:
720  m_StepDone = true;
721  break;
722  case pars_ChMaturing:
723  ChMaturing();
724  m_StepDone = true;
725  break;
726 
727  default:
728  m_OurLandscape->Warn( "Partridge_Chick::Step - unknown pars type", NULL );
729  exit( 1 );
730  }
731 }
virtual Partridge_State ChMaturing(void)
Maturation.
Definition: Partridge_All.cpp:961

References ChMaturing(), TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, Partridge_Base::m_state, TALMaSSObject::m_StepDone, pars_ChDeveloping, pars_ChDying, pars_ChMaturing, pars_Initiation, and Landscape::Warn().

Member Data Documentation

◆ m_sex

bool Partridge_Chick::m_sex
protected

◆ m_starve

int Partridge_Chick::m_starve
protected

Days spent starving.

Referenced by ChDeveloping(), and Partridge_Chick().


The documentation for this class was generated from the following files: